package org.javaboy.listener_demo.listener;

import org.javaboy.listener_demo.event.MyEvent01;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 将监听器注册到 Spring 容器中
 */
@Component
public class MyListener01 implements ApplicationListener<MyEvent01> {
    @Override
    public void onApplicationEvent(MyEvent01 event) {
        System.out.println("event = " + event);
    }
}
